<!--添加栏目-->
<div class="dialog_content" style="max-height: 350px; overflow-y: auto;">
	<form id="info_form" action="{:U('config/add_value')}" method="post">
		<table width="100%" class="table_form" id="table_form">
			<tr><td>
					添加：<input type="button" class="btn btn-default addFiled" value="添加">
					<input type="hidden" name="id" value="{$id}">
			</td></tr>
			<empty name="value">
				<tr><td><input class="form-control" name="value[]"></td></tr>
				<else/>
				<foreach name="value" item="vo">
					<tr><td><input class="form-control" name="value[]" value="{$vo}"></td></tr>
				</foreach>
			</empty>
		</table>
	</form>
</div>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.errNum === 0){
			$.dialog.get('add_value').close();
			$.yhxia.tip({content:result.retData});
			window.location.reload();
		} else {
			$.yhxia.tip({content:result.errMsg, icon:'alert'});
		}
	}
});
$('.addFiled').click(function () {
	var temp='<tr><td><input class="form-control" name="value[]"></td></tr>';
	$('#table_form').append(temp);
});
</script>